package com.baizhi.service;

import com.baizhi.dao.TitleDAO;
import com.baizhi.dao.TitleDAOImpl;
import com.baizhi.entity.Title;

import java.util.List;

public class TitleServiceImpl implements TitleService{
    private TitleDAO td = new TitleDAOImpl();
    @Override
    public List<Title> showAll() {
        return td.queryAll();
    }

    @Override
    public void addSaves(Title title) {
        td.addTitle(title);
    }

    @Override
    public void showMyArticle(Title title) {
        td.showMyArticle(title);
    }

    @Override
    public Title show(Title title) {
        return td.showMyArticle(title);
    }

    @Override
    public List<Title> queryMyTitle(Title title) {
        return td.queryMyTitle(title);
    }

    @Override
    public Title queryByTitle(Title title) {
        return td.queryByTitle(title);
    }

    @Override
    public void update(Title title) {
        td.update(title);
    }

    @Override
    public void delete(Title title) {
        td.delete(title);
    }

}
